-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Select container pressable functionality fixed. #4945
base: master
Are you sure you want to change the base?
Conversation
@oguzhnatly is attempting to deploy a commit to the Geekyants Team Team on Vercel. A member of the Team first needs to authorize it. |
@oguzhnatly Thanks for working on this. We've already fixed this here ea38f62 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello @oguzhnatly, when is planned to release the next version to include that fix?, I am blocked now because on Android, the Select component works as InputText. Thanks! |
Same issue. The Select component acts like Input which toggles the keyboard |
Hi @jgudo ad @dimaslz, thank you for supporting my PR. However, I'm neither a reviewer, authorized to approve nor make approval for this in this NativeBase. Please contact with or tag @surajahmed! |
This commit ea38f62 didn't resolve the problem, at least for me, it didn't. Had to change this line to make it work properly on Android. <Pressable
onPress={() => {
Keyboard.dismiss();
setIsOpen(true);
onOpen && onOpen();
}}
disabled={isDisabled}
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
ref={mergeRefs([ref, _ref])}
+ pointerEvents='box-only'
{...layoutProps}
> |
This is still an issue on Android...pressing the Select input will open the keyboard and hide the bottom sheet. |
Try this fix with diff --git a/node_modules/native-base/src/components/primitives/Select/Select.tsx b/node_modules/native-base/src/components/primitives/Select/Select.tsx
index ee8df1e..0647471 100644
--- a/node_modules/native-base/src/components/primitives/Select/Select.tsx
+++ b/node_modules/native-base/src/components/primitives/Select/Select.tsx
@@ -188,6 +188,7 @@ const Select = (
accessibilityRole="button"
ref={mergeRefs([ref, _ref])}
{...layoutProps}
+ pointerEvents='box-only'
>
{commonInput}
</Pressable> |
Summary
The action sheet does not open when the current select container is pressed. The only button that could be pressed was the dropdown icon. I fixed it by adding the
onPressIn
prop to its input to be able to open the action sheet.Changelog
[General] [Fixed] - Pressable function added to Select's input as onPressIn.
Test Plan
It does not change the user interface.